package org.leon.demo.controller;

import org.leon.demo.service.UserService;
import org.leon.mvcframework.annotations.MvcAutowired;
import org.leon.mvcframework.annotations.MvcController;
import org.leon.mvcframework.annotations.MvcRequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@MvcController
@MvcRequestMapping("/user")
public class UserController {

    @MvcAutowired
    private UserService userService;


    @MvcRequestMapping("/query")
    public String getUserName(HttpServletRequest request, HttpServletResponse response, String name){
        return userService.getUserName(name);
    }
}
